<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="java.util.*,com.autoMobile.bean.rrmSgjl" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>修改事故记录</title>
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/styles.css">
</head>
<body>

    <div class="records-container">
        <div class="records-header">
        		
           <%
		        //从作用域中获取用户列表 
		        List<rrmSgjl> list = (List<rrmSgjl>) request.getAttribute("list");
		    %>
            <div class="filter-bar">
                <input type="text" class="form-control" placeholder="驾驶员" style="width: 120px; margin-right: 10px;">
                <input type="text" class="form-control" placeholder="车牌号" style="width: 120px; margin-right: 10px;">
                <select class="form-control" style="width: 120px; margin-right: 10px;">
                    <option>全部类型</option>
                    <option>碰撞事故</option>
                    <option>刮蹭事故</option>
                    <option>自然灾害</option>
                    <option>其他</option>
                </select>
                <select class="form-control" style="width: 120px; margin-right: 10px;">
                    <option>全部状态</option>
                    <option>处理中</option>
                    <option>已处理</option>
                </select>
                <button class="btn">搜索</button>
            </div>
        </div>

        <div class="table-responsive">
            <table class="table">
                <thead>
                    <tr>
                        <th>事故时间</th>
                        <th>驾驶员</th>
                        <th>车牌号</th>
                        <th>事故类型</th>
                        <th>事故地点</th>
                         <th>理赔金额</th>
                        <th>处理状态</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <%
		            if (list != null) {
		                // 遍历用户列表，展示每个保险的详细信息
		                for (rrmSgjl sgjl : list) {
		        %>
		        <tr>
		            <td><%= sgjl.getSgsj()%></td>
					<td><%= sgjl.getJsy()%></td>
					<td><%= sgjl.getCph()%></td>
					<td><%= sgjl.getSglx()%></td>
					<td><%= sgjl.getSgdd()%></td>
					<td><%= sgjl.getLpje()%></td>
					 <td><span class="status-tag status-pending">处理中</span></td>
                        <td>
                            <button class="btn btn-small btn-secondary">查看详情</button>
                            <button class="btn btn-small">更新状态</button>
                            <button class="btn btn-small" onclick="window.location.href='<%= request.getContextPath() %>/DelSgjlServlet?id=<%= sgjl.getId() %>'">删除</button>

                        </td>

		        </tr>
		        <%
		                }
		            }
		        %>
                </tbody>
            </table>
        </div>

        <div class="pagination">
            <button class="btn btn-page">&lt;</button>
            <button class="btn btn-page active">1</button>
            <button class="btn btn-page">2</button>
            <button class="btn btn-page">3</button>
            <button class="btn btn-page">&gt;</button>
        </div>
    </div>
</body>
</html> 